package com.smedi.ismedi.personnel.core.domain.service.impl;

import com.smedi.ismedi.personnel.core.domain.aggregatemodel.SubOrganizationSyncFromImis;
import com.smedi.ismedi.personnel.core.domain.repository.SubOrganizationSyncFromImisRepository;
import com.smedi.ismedi.personnel.core.domain.service.SubOrganizationSyncFromImisDomainService;
import com.smedi.ismedi.web.starter.util.DozerUtil;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: xulinjun
 * @Date: 2021-6-16 13:54
 */
@Slf4j
@Service
@AllArgsConstructor
public class SubOrganizationSyncFromImisDomainServiceImpl implements SubOrganizationSyncFromImisDomainService {
    private final SubOrganizationSyncFromImisRepository subOrganizationSyncFromImisRepository;

    @Override
    public void saveAll(List<SubOrganizationSyncFromImis> list) {
        subOrganizationSyncFromImisRepository.doInsert(list);
    }

    @Override
    public void deleteAll() {
        subOrganizationSyncFromImisRepository.deleteAll();
    }

    @Override
    public List<SubOrganizationSyncFromImis> selectAll() {
        return subOrganizationSyncFromImisRepository.selectAll();
    }
}
